package com.netease.xone.activity;

import protocol.meta.FilterInfo;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.support.v4.app.FragmentTransaction;
import android.widget.FrameLayout;

import com.netease.pkgRelated.XoneConsts;
import com.netease.xone.R;
import com.netease.xone.fragment.FragmentModifyFindCondition;

public class ActivityModifyFindCondition extends ActivityX1Base {

//    public static void startActivity(Context context){
//        Intent i = new Intent(context, ActivityModifyFindCondition.class);
//        context.startActivity(i);
//    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        FilterInfo filter = getIntent().getExtras().getParcelable(XoneConsts.BUNDLE_KEY.FIND_FRIENDS_FILTER);

        FrameLayout frame = new FrameLayout(this);
        frame.setId(R.id.activity_modify_find_condition_container_id);
        setContentView(frame);

        if (findViewById(R.id.activity_modify_find_condition_container_id) != null && savedInstanceState == null) {
            FragmentModifyFindCondition f = FragmentModifyFindCondition.newInstance(filter);
            FragmentTransaction ft = getSupportFragmentManager().beginTransaction();
            ft.replace(R.id.activity_modify_find_condition_container_id, f);
            ft.commit();
        }
    }
}
